package omm.domain.enums;


public enum Commission {

	ALL(1), QUOTED(2), WON(3), LOST(4);

	private int code;

	Commission(int code) {
		this.code = code;
	}

	int getCode() {
		return code;
	}

	public static Commission fromCode(Integer code) {
		if (code != null) {
			for (Commission b : Commission.values()) {
				if (code == b.getCode()) {
					return b;
				}
			}
		}
		return null;
	}
}
